package com.deft.design.observer;

import lombok.extern.slf4j.Slf4j;

import java.time.LocalDateTime;

/**
 * @author Hide丶love
 * @date 2022/05/18
 **/
@Slf4j
public class LotteryServiceImpl extends LotteryService {

    private final MinibusTargetService minibusTargetService = new MinibusTargetService();

    @Override
    protected LotteryResult doDraw(String uId) {
        String lottery = minibusTargetService.lottery(uId);
        return new LotteryResult(uId, lottery, LocalDateTime.now());
    }
}
